﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="sms_type.aspx.vb" Inherits="webfinancegdrassign4.sms_type" %>

    

     <%--Smart Money $aver Project for University of Herts--%>
 <%--Date: 01 December 2013--%>   
 <%--Version 1--%>
 <%--Project Brief Description - This is a Smart Money Saver asp.net product using VB.net. It is intended to be used by Smart Money Savers who want to make and save money and earn and save a certain amount to benefit--%>
 <%--Program Brief Description - This is the main Site.Master file. All change appear on all pages. This is a standard program from a default build from setting up the project in Visual Studio --%>
 <%--Changes - Added an image for the Smart Investor program / website --%>
 <%--Changes - Changed original Texts to 'Smart Money $aver ' --%>

 <%--Update 1 -  5th Jan 2014 - sms_comments.aspx enabled page to allow admin user to update,delete and select data from Table --%>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

        <hgroup></hgroup>
        <h1><br /></h1> 
        <h1>Edit Type Information</h1> 

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource005" DataKeyNames="ID" AllowPaging="True" AllowSorting="True" CellPadding="4" style="font-size: xx-small" ForeColor="#333333" GridLines="None">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowSelectButton="True" />
            <asp:BoundField DataField="about_website" HeaderText="about_website" SortExpression="about_website"  />
            <asp:BoundField DataField="contact_website" HeaderText="contact_website" SortExpression="contact_website" />
            <asp:BoundField DataField="about_image1" HeaderText="about_image1" SortExpression="about_image1" />
            <asp:BoundField DataField="about_image2" HeaderText="about_image2" SortExpression="about_image2" />
            <asp:BoundField DataField="about_image3" HeaderText="about_image3" SortExpression="about_image3" />
            <asp:BoundField DataField="about_image4" HeaderText="about_image4" SortExpression="about_image4" />
            <asp:BoundField DataField="about_image5" HeaderText="about_image5" SortExpression="about_image5" />
            <asp:BoundField DataField="about_image6" HeaderText="about_image6" SortExpression="about_image6" />
            <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" InsertVisible="False" ReadOnly="True" />
        
        </Columns>



        <EditRowStyle BackColor="#2461BF" />



        <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />



    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource005" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString006 %>" ProviderName="<%$ ConnectionStrings:ConnectionString006.ProviderName %>" SelectCommand="SELECT [ID], [about_website], [contact_website], [about_image1], [about_image2], [about_image3], [about_image4], [about_image5], [about_image6] FROM [sms_info]" OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues" InsertCommand="INSERT INTO [sms_info] ([ID], [about_website], [contact_website], [about_image1], [about_image2], [about_image3], [about_image4], [about_image5], [about_image6]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)" DeleteCommand="DELETE FROM [sms_info] WHERE [ID] = ? AND (([about_website] = ?) OR ([about_website] IS NULL AND ? IS NULL)) AND (([contact_website] = ?) OR ([contact_website] IS NULL AND ? IS NULL)) AND (([about_image1] = ?) OR ([about_image1] IS NULL AND ? IS NULL)) AND (([about_image2] = ?) OR ([about_image2] IS NULL AND ? IS NULL)) AND (([about_image3] = ?) OR ([about_image3] IS NULL AND ? IS NULL)) AND (([about_image4] = ?) OR ([about_image4] IS NULL AND ? IS NULL)) AND (([about_image5] = ?) OR ([about_image5] IS NULL AND ? IS NULL)) AND (([about_image6] = ?) OR ([about_image6] IS NULL AND ? IS NULL))" UpdateCommand="UPDATE [sms_info] SET [about_website] = ?, [contact_website] = ?, [about_image1] = ?, [about_image2] = ?, [about_image3] = ?, [about_image4] = ?, [about_image5] = ?, [about_image6] = ? WHERE [ID] = ? AND (([about_website] = ?) OR ([about_website] IS NULL AND ? IS NULL)) AND (([contact_website] = ?) OR ([contact_website] IS NULL AND ? IS NULL)) AND (([about_image1] = ?) OR ([about_image1] IS NULL AND ? IS NULL)) AND (([about_image2] = ?) OR ([about_image2] IS NULL AND ? IS NULL)) AND (([about_image3] = ?) OR ([about_image3] IS NULL AND ? IS NULL)) AND (([about_image4] = ?) OR ([about_image4] IS NULL AND ? IS NULL)) AND (([about_image5] = ?) OR ([about_image5] IS NULL AND ? IS NULL)) AND (([about_image6] = ?) OR ([about_image6] IS NULL AND ? IS NULL))">
        <DeleteParameters>
            <asp:Parameter Name="original_ID" Type="Int32" />
            <asp:Parameter Name="original_about_website" Type="String" />
            <asp:Parameter Name="original_about_website" Type="String" />
            <asp:Parameter Name="original_contact_website" Type="String" />
            <asp:Parameter Name="original_contact_website" Type="String" />
            <asp:Parameter Name="original_about_image1" Type="String" />
            <asp:Parameter Name="original_about_image1" Type="String" />
            <asp:Parameter Name="original_about_image2" Type="String" />
            <asp:Parameter Name="original_about_image2" Type="String" />
            <asp:Parameter Name="original_about_image3" Type="String" />
            <asp:Parameter Name="original_about_image3" Type="String" />
            <asp:Parameter Name="original_about_image4" Type="String" />
            <asp:Parameter Name="original_about_image4" Type="String" />
            <asp:Parameter Name="original_about_image5" Type="String" />
            <asp:Parameter Name="original_about_image5" Type="String" />
            <asp:Parameter Name="original_about_image6" Type="String" />
            <asp:Parameter Name="original_about_image6" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="ID" Type="Int32" />
            <asp:Parameter Name="about_website" Type="String" />
            <asp:Parameter Name="contact_website" Type="String" />
            <asp:Parameter Name="about_image1" Type="String" />
            <asp:Parameter Name="about_image2" Type="String" />
            <asp:Parameter Name="about_image3" Type="String" />
            <asp:Parameter Name="about_image4" Type="String" />
            <asp:Parameter Name="about_image5" Type="String" />
            <asp:Parameter Name="about_image6" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="about_website" Type="String" />
            <asp:Parameter Name="contact_website" Type="String" />
            <asp:Parameter Name="about_image1" Type="String" />
            <asp:Parameter Name="about_image2" Type="String" />
            <asp:Parameter Name="about_image3" Type="String" />
            <asp:Parameter Name="about_image4" Type="String" />
            <asp:Parameter Name="about_image5" Type="String" />
            <asp:Parameter Name="about_image6" Type="String" />
            <asp:Parameter Name="original_ID" Type="Int32" />
            <asp:Parameter Name="original_about_website" Type="String" />
            <asp:Parameter Name="original_about_website" Type="String" />
            <asp:Parameter Name="original_contact_website" Type="String" />
            <asp:Parameter Name="original_contact_website" Type="String" />
            <asp:Parameter Name="original_about_image1" Type="String" />
            <asp:Parameter Name="original_about_image1" Type="String" />
            <asp:Parameter Name="original_about_image2" Type="String" />
            <asp:Parameter Name="original_about_image2" Type="String" />
            <asp:Parameter Name="original_about_image3" Type="String" />
            <asp:Parameter Name="original_about_image3" Type="String" />
            <asp:Parameter Name="original_about_image4" Type="String" />
            <asp:Parameter Name="original_about_image4" Type="String" />
            <asp:Parameter Name="original_about_image5" Type="String" />
            <asp:Parameter Name="original_about_image5" Type="String" />
            <asp:Parameter Name="original_about_image6" Type="String" />
            <asp:Parameter Name="original_about_image6" Type="String" />
        </UpdateParameters>
        </asp:SqlDataSource>
        <br />
        <br />
        <h1>Add a New Record </h1>
        <br style="font-size: small" />
        <br style="font-size: small" />
        <asp:Label ID="Label1" runat="server" style="font-size: small" Text="About Website"></asp:Label>
        <span style="font-size: small">&nbsp;&nbsp; :<asp:TextBox ID="about_website" runat="server" Width="234px"></asp:TextBox>
        </span>
        <br style="font-size: small" />
        <asp:Label ID="Label2" runat="server" style="font-size: small" Text="Contact Website"></asp:Label>
        <span style="font-size: small">:<asp:TextBox ID="contact_website" runat="server" Width="235px"></asp:TextBox>
        </span>
        <br style="font-size: small" />
        <asp:Label ID="Label3" runat="server" style="font-size: small" Text="About Image 1 "></asp:Label>
        <span style="font-size: small">&nbsp; :<asp:TextBox ID="about_image1" runat="server" Width="234px"></asp:TextBox>
        </span>
        <br style="font-size: small" />
        <asp:Label ID="Label4" runat="server" style="font-size: small" Text="About Image 2"></asp:Label>
        <span style="font-size: small">&nbsp;&nbsp; :<asp:TextBox ID="about_image2" runat="server" Width="234px"></asp:TextBox>
        </span>
        <br style="font-size: small" />
        <asp:Label ID="Label5" runat="server" style="font-size: small" Text="About Image 3"></asp:Label>
        <span style="font-size: small">&nbsp;&nbsp; :<asp:TextBox ID="about_image3" runat="server" Width="234px"></asp:TextBox>
        </span>
        <br style="font-size: small" />
        <asp:Label ID="Label6" runat="server" style="font-size: small" Text="About Image 4"></asp:Label>
        <span style="font-size: small">&nbsp;&nbsp; :<asp:TextBox ID="about_image4" runat="server" Width="234px"></asp:TextBox>
        </span>
        <br style="font-size: small" />
        <asp:Label ID="Label7" runat="server" style="font-size: small" Text="About Image 5"></asp:Label>
        <span style="font-size: small">&nbsp;&nbsp; :<asp:TextBox ID="about_image5" runat="server" Width="234px"></asp:TextBox>
        </span>
        <br style="font-size: small" />
        <asp:Label ID="Label8" runat="server" style="font-size: small" Text="About Image 6"></asp:Label>
        <span style="font-size: small">&nbsp;&nbsp; :<asp:TextBox ID="about_image6" runat="server" Width="234px"></asp:TextBox>
        <br />
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" Height="36px" Text="Save New Record" Width="150px" />
        &nbsp;
<asp:Label ID="labelrecord" runat="server"></asp:Label>
        <br />
        <asp:Button ID="Button2" runat="server" Height="36px" Text="Return to Main Menu" Width="150px" PostBackUrl="~/Account/Admininput.aspx" />
        <br />
        </span>
        <br />
</asp:Content>
